package com.demo;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lkz
 * @version 1.0.0
 * @ClassName Test.java
 * @Description TODO
 * @createTime 2022年04月09日 00:35:00
 */
@RestController
public class Test {

    @Autowired
    RabbitTemplate rabbitTemplate;

    @GetMapping("/test")
    public String test(){
        rabbitTemplate.convertAndSend("logs","","这是日志广播");
        return "ok";
    }
}
